<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>企业详细介绍</title>
    <link rel="stylesheet" href="../../css/main.css" media="all">
    <link rel="stylesheet" href="../../css/jobDetail.css" media="all">
    <script type="text/javascript" src="../../libs/loading/okLoading.js"></script>
</head>

<body>
<div>
    <!-- 企业信息头部 -->
    <div class="layui-container-md job_synopsis" id="dat_cpmpanyhead">
        <div class="layui-row">
            <div class="layui-col-md1">&nbsp;</div>
            <div class="layui-col-xs4 layui-col-sm7 layui-col-md7  inner_content_left">
                <div class="layadmin-homepage-pad-ver layui-col-md-offset1 layui-inline">
                    <img class="layadmin-homepage-pad-img" src="../../image/defalut.jpg" width="106" height="106"
                         style="border-radius: 20%;">
                </div>
                <div class="layui-row layui-inline" style="margin-left: 20px">
                    <h1 class="layui-inline" style="color: white;font-size: 35px">中软国际</h1>
                    <i class="layui-icon layui-icon-auz layui-inline" id="auz"
                       style="color: #BFBFBF;margin-left: 10px"></i>
                    <div style="margin-top: 10px;margin-left: -10px" class="layui-breadcrumb">
                    </div>
                </div>
            </div>
            <div class="layui-col-md3 layui-col-xs2 layui-col-sm5 layui-hide-xs inner_content_right layui-col-md-offset1"
                 style="margin-top: 20px">
                <h1 style="color: white;font-size: 35px">49</h1>
                <span style="color: white;">在岗职位</span>
            </div>
        </div>
    </div>
    <!-- 企业信息头部end -->

    <!-- 企业信息详细 -->
    <div class="layui-container-md ">
        <div class="layui-row">
            <div class="layui-col-md8" style="border-right:3px solid #f2f5fa;">
                <div class="layui-col-md2">&nbsp;</div>
                <!-- 左侧详细 -->
                <div class="layui-col-xs4 layui-col-sm7 layui-col-md10 inner_content_left" id="dat_cpmpany">
                    <div class="layui-row" style="margin-top:20px">
                        <div class="layui-card">
                            <div class="layui-card-header">
                                <h2>
                                    <strong>公司简介</strong>
                                </h2>
                            </div>
                            <div class="layui-card-body job_sy_color" style="font-size: 16px;line-height: 30px">
                            </div>
                        </div>
                    </div>

                    <div class="layui-row" style="margin-top:20px;font-size: 16px;line-height: 30px">
                        <div class="layui-card">
                            <div class="layui-card-header">
                                <h2>
                                    <strong>工商信息</strong>
                                </h2>
                            </div>
                            <div class="layui-card-body job_sy_color"
                                 style="margin-top:10px;border: #aaa7a7 1px solid;">
                                <div class="layui-inline" style="margin-top: 20px">
                                    <p class="layui-inline" style="text-align: left;margin-left: 10px">注册资本: </p>
                                    <p class="layui-inline" style="margin-left: 10px;color: #000000"></p>
                                </div>
                                <div class="layui-inline" style="margin-top: 20px;margin-left: 40px">
                                    <p class="layui-inline" style="text-align: left;margin-left: 10px">成立时间: </p>
                                    <p class="layui-inline" style="margin-left: 10px;color: #000000"></p>
                                </div>
                                <div style="margin-top: 20px">
                                    <p class="layui-inline" style="text-align: left;margin-left: 10px">企业类型: </p>
                                    <p class="layui-inline" style="margin-left: 10px;color: #000000"></p>
                                </div>
                                <div class="layui-inline" style="margin-top: 20px">
                                    <p class="layui-inline" style="text-align: left;margin-left: 10px">行业: </p>
                                    <p class="layui-inline" style="margin-left: 10px;color: #000000"></p>
                                </div>
                                <div class="layui-inline" style="margin-top: 20px;margin-left: 70px">
                                    <p class="layui-inline" style="text-align: left;margin-left: 10px">企业规模: </p>
                                    <p class="layui-inline" style="margin-left: 10px;color: #000000"></p>
                                </div>
                                <div style="margin-top: 20px">
                                    <p class="layui-inline" style="text-align: left;margin-left: 10px">统一信用代码: </p>
                                    <p class="layui-inline" style="margin-left: 10px;color: #000000"></p>
                                </div>
                                <div style="margin-top: 20px">
                                    <p class="layui-inline" style="text-align: left;margin-left: 10px">经营范围: </p>
                                    <p class="layui-inline" style="margin-left: 10px;color: #000000"></p>
                                </div>
                            </div>
                        </div>
                    </div>


                </div>
                <!-- 左侧详细end -->
            </div>
            <!-- 右侧开始-->
            <div class="layui-col-md3 inner_content_right">

                <div class="layui-row promotion-job" style="margin-top:20px;">
                    <div class="layui-card" style="border:1px #e3e7ed solid;color: #8d92a1;background: #f6f6f8">
                        <div class="layui-card-header">
                            <h2>在招岗位</h2>
                        </div>
                        <div class="layui-card-body rjlist r3" id="dat_cpmpanyjob">
                            <div class="e">
                                <a class="name" target="_blank" href=" " title="消防中控员">消防中控员</a>
                                <a target="_blank" href=" " title="昆明万博吾悦商业管理有限公司">昆明万博吾悦商业管理有限公司</a>
                                <strong title="4.5-6千/月">4.5-6千/月</strong>
                                <span title="昆明-呈贡区">昆明-呈贡区</span>
                                <em class="apply" name="delivery_em" onclick="emClick(this)"></em>
                                <input class="checkbox" type="checkbox" name="delivery_jobid_similar" value="121507520"
                                       style="display:none" jt="2">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-row" style="margin-top:20px">
                    <div class="layui-card" id="dat_companyEnvironment">
                        <div class="layui-card-header">
                            <h2>
                                <strong>公司环境</strong>
                            </h2>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 右侧结束-->
    </div>
</div>

</body>
<!--公司头部模板-->
<script id="tpl_companyhead" type="text/html">
    <div class="layui-row">
        <div class="layui-col-md1">&nbsp;</div>
        <div class="layui-col-xs4 layui-col-sm7 layui-col-md7  inner_content_left">
            <div class="layadmin-homepage-pad-ver layui-col-md-offset1 layui-inline">
                <img class="layadmin-homepage-pad-img" src="{{d.data.logoimg}}" width="106" height="106"
                     style="border-radius: 20%;">
            </div>
            <div class="layui-row layui-inline" style="margin-left: 20px">
                <h1 class="layui-inline" style="color: white;font-size: 35px">{{d.data.enterprisename}}</h1>
                <i class="layui-icon layui-icon-auz layui-inline" id="auznew"
                   style="color: #BFBFBF;margin-left: 10px"></i>
                <div style="margin-top: 10px;margin-left: -10px" class="layui-breadcrumb">
                </div>
            </div>
        </div>
        <div class="layui-col-md3 layui-col-xs2 layui-col-sm5 layui-hide-xs inner_content_right layui-col-md-offset1"
             style="margin-top: 20px">
            <h1 style="color: white;font-size: 35px">{{d.jobcnt}}</h1>
            <span style="color: white;">在岗职位</span>
        </div>
    </div>
</script>
<!--公司信息模板-->
<script id="tpl_company" type="text/html">
    <!--公司简介-->
    <div class="layui-row" style="margin-top:20px">
        <div class="layui-card">
            <div class="layui-card-header">
                <h2>
                    <strong>公司简介</strong>
                </h2>
            </div>
            <div class="layui-card-body job_sy_color" style="font-size: 16px;line-height: 30px">{{d.companyprofile}}
            </div>
        </div>
    </div>
    <!-- 工商信息 -->
    <div class="layui-row" style="margin-top:20px;font-size: 16px;line-height: 30px">
        <div class="layui-card">
            <div class="layui-card-header">
                <h2>
                    <strong>工商信息</strong>
                </h2>
            </div>
            <div class="layui-card-body job_sy_color" style="margin-top:10px;border: #aaa7a7 1px solid;">
                <div class="layui-inline" style="margin-top: 20px">
                    <p class="layui-inline" style="text-align: left;margin-left: 10px">注册资本: </p>
                    <p class="layui-inline" style="margin-left: 10px;color: #000000">{{d.registercapital}}</p>
                </div>
                <div class="layui-inline" style="margin-top: 20px;margin-left: 40px">
                    <p class="layui-inline" style="text-align: left;margin-left: 10px">成立时间: </p>
                    <p class="layui-inline" style="margin-left: 10px;color: #000000">{{d.originatetime}}</p>
                </div>
                <div style="margin-top: 20px">
                    <p class="layui-inline" style="text-align: left;margin-left: 10px">企业类型: </p>
                    <p class="layui-inline" style="margin-left: 10px;color: #000000">{{d.enterprisetype}}</p>
                </div>
                <div class="layui-inline" style="margin-top: 20px">
                    <p class="layui-inline" style="text-align: left;margin-left: 10px">行业: </p>
                    <p class="layui-inline" style="margin-left: 10px;color: #000000">{{d.industry}}</p>
                </div>
                <div class="layui-inline" style="margin-top: 20px;margin-left: 100px">
                    <p class="layui-inline" style="text-align: left;margin-left: 10px">企业规模: </p>
                    <p class="layui-inline" style="margin-left: 10px;color: #000000">{{d.scale}}</p>
                </div>
                <div style="margin-top: 20px">
                    <p class="layui-inline" style="text-align: left;margin-left: 10px">统一信用代码: </p>
                    <p class="layui-inline" style="margin-left: 10px;color: #000000">{{d.usccode}}</p>
                </div>
                <div style="margin-top: 20px">
                    <p class="layui-inline" style="text-align: left;margin-left: 10px">经营范围: </p>
                    <p class="layui-inline" style="margin-left: 10px;color: #000000">{{d.scopeofbusiness}}</p>
                </div>
            </div>
        </div>
    </div>
</script>
<!-- 公司环境模板 -->
<script id="tpl_companyEnvironment" type="text/html">
    <div class="layui-carousel" id="test1" style="margin-top: 20px;">
        <div carousel-item>
            {{# layui.each(d.data, function(index, item){ }}
            <div>
                <img src="{{item.photoname}}" height="90%"
                     style="margin-left: 3%;margin-top: 2.5%">
            </div>
            {{# }); }}
            {{# if(d.data.length === 0){ }}
            <div>
                <img src="../../imgs/tx001.jpg" height="90%"
                     style="margin-left: 3%;margin-top: 2.5%">
            </div>
            {{# } }}
        </div>
    </div>
</script>
<!--岗位模板-->
<script id="tpl_companyjob" type="text/html">
    {{# layui.each(d.data, function(index, item){ }}
    <div class="e">
        <a class="name" style="font-size: 18px;font-family: bold" target="_blank"
           href="jobDetail-enter.html?jobid={{item.jobid}}">{{item.jobname}}</a>
        <a>{{item.jobType.typename}}</a>
        <strong title="">{{item.jobsalary}}</strong>
        <span title="">{{item.workplace}}</span>
        <em class="apply" name="delivery_em" onclick="emClick(this)"></em>
        <input class="checkbox" type="checkbox" name="delivery_jobid_similar" value="121507520"
               style="display:none" jt="2">
    </div>
    {{# }); }}
</script>
<!--  特色活动模板 -->
<script id="tpl_specialActivities" type="text/html">
    <div class="layui-row" style="margin-top:20px">
        <div class="layui-card" id="datasourse">
            <div class="layui-card-header">
                <h2>
                    <strong>企业特色活动</strong>
                </h2>
            </div>
            {{# layui.each(d.data, function(index, item){ }}
            <div class="layui-inline" style="margin-top: 20px">
                <div class="layui-inline" style="margin-left: 20px;">
                    <img src={{item.activitieimage}} width="150"
                         height="150">
                </div>
                <!-- 活动内容-->
                <div class="layui-inline" style="width: 500px;margin-left: 10px">
                    {{ item.activitiecontent }}
                </div>
            </div>
            {{# }); }}
            {{# if(d.data.length === 0){ }}
            <div class="layui-inline" style="margin-top: 20px">
                暂无特色活动
            </div>
            {{# } }}
        </div>
    </div>
</script>


<script src="../../libs/layui/layui.js"></script>
<script>
    layui.use(['element', 'layer', 'carousel', 'jquery', 'laytpl', 'okLayer'], function () {
        let carousel = layui.carousel;
        let $ = layui.jquery;
        let laytpl = layui.laytpl;
        let okLayer = layui.okLayer;

        // 获取contentText
        const ctx = function () {
            let pathName = document.location.pathname;
            let index = pathName.substr(1).indexOf("/");
            let result = pathName.substr(0, index + 1);
            return result;
        }();

        //从cookie获取企业信息
        var enterprise = JSON.parse(window.sessionStorage.getItem("enterprise"));
        var priseid = enterprise.enterpriseid;
        var url = ctx + "/pages/enterprise/enterpriseLogin.html";
        if (enterprise == null) {
            okLayer.yellowSighMsg("登陆时间超时，请重新登录！", function () {
                window.sessionStorage.clear();
                window.open(url, "_top", "", "true");
            });
        }

        loadcompnyhead();

        //加载头信息
        function loadcompnyhead() {
            var tplcompanyhead = document.getElementById('tpl_companyhead').innerHTML;
            $.ajax({
                //请求地址
                url: ctx + "/ygssecs/getcompanyHead",
                //请求方式
                type: "get",
                data: {priseid: priseid},
                //数据，json字符串
                dataType: "JSON",
            }).done(function (res) {
                okLoading.close();
                if (res.code == 200) {
                    var authdata = res;
                    laytpl(tplcompanyhead).render(authdata, function (html) {
                        document.getElementById('dat_cpmpanyhead').innerHTML = html;
                        loadcompny();
                        loadcompnyjob();
                    })
                }
                //判断认证
                if (enterprise.certificationstatus == "2") {
                    $("#auznew").css("color", "#FF5722");
                }
            }).fail(function (e) {
                console.error(e)
            })
        }

        //加载岗位信息
        function loadcompnyjob() {
            var tplcompanyjob = document.getElementById('tpl_companyjob').innerHTML;
            $.ajax({
                //请求地址
                url: ctx + "/ygssecs/getjobListbypriseid",
                //请求方式
                type: "get",
                data: {
                    priseid: priseid,
                    pageSize: 5,
                    pageNum: 1
                },
                //数据，json字符串
                dataType: "JSON",
            }).done(function (res) {
                okLoading.close();
                if (res.code == 200) {
                    var authdata = res;
                    laytpl(tplcompanyjob).render(authdata, function (html) {
                        document.getElementById('dat_cpmpanyjob').innerHTML = html;
                    })
                    loadcompanyEnvironment();
                }
            }).fail(function (e) {
                console.error(e)
            })
        }

        //加载公司信息
        function loadcompny() {
            var tplcompany = document.getElementById('tpl_company').innerHTML;
            $.ajax({
                //请求地址
                url: ctx + "/ygssecs/getcompanyDetail",
                //请求方式
                type: "get",
                data: {priseid: priseid},
                //数据，json字符串
                dataType: "JSON",
            }).done(function (res) {
                okLoading.close();
                if (res.code == 200) {
                    var authdata = res.data.authInfomation;
                    laytpl(tplcompany).render(authdata, function (html) {
                        document.getElementById('dat_cpmpany').innerHTML = html;
                        loadspecialActivities();
                    })
                }
            }).fail(function (e) {
                console.error(e)
            })
        }

        //加载公司环境
        function loadcompanyEnvironment() {
            var tplcompanyEnvironment = document.getElementById('tpl_companyEnvironment').innerHTML;
            $.ajax({
                url: ctx + "/ygssecs/getEnterpriseImg",
                type: 'get',
                dataType: 'json',
                data: {enterpriseid: priseid}
            }).done(function (res) {
                if (res.code == 200) {
                    laytpl(tplcompanyEnvironment).render(res, function (html) {
                        $("#dat_companyEnvironment").append(html);
                    })
                    //轮播
                    carousel.render({
                        elem: '#test1'
                        , width: '100%' //设置容器宽度
                        , height: '200px'
                        , arrow: 'always' //始终显示箭头
                        , anim: 'default' //切换动画方式
                        , indicator: 'none'
                    });
                } else {
                    console.log("数据请求失败")
                }
            }).fail(function (e) {
                console.error(e)
            })
        }

        //加载特色活动
        function loadspecialActivities() {
            // 得到特色活动模版html
            var tplspecialActivities = document.getElementById('tpl_specialActivities').innerHTML;
            $.ajax({
                url: ctx + "/ygssecs/getEnterpriseAct",
                type: 'get',
                data: {enterpriseid: priseid},
                dataType: 'json'
            }).done(function (res) {
                if (res.code == 200) {
                    laytpl(tplspecialActivities).render(res, function (html) {
                        $("#dat_cpmpany").append(html);
                    })
                } else {
                    console.log("数据请求失败")
                }
            }).fail(function (e) {
                console.error(e)
            })
        }

    });
</script>
</html>